package com.medical.app.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.medical.app.entity.HealthyEssay;

import java.util.List;

public interface HealthyEssayMapper extends BaseMapper<HealthyEssay> {
    default HealthyEssay selectHealthyEssay(Long healthyEssayId){
        LambdaQueryWrapper<HealthyEssay> queryWrapper= new LambdaQueryWrapper<HealthyEssay>().eq(HealthyEssay::getHealthyEssayId,healthyEssayId);
        return this.selectOne(queryWrapper);
    };

    default List<HealthyEssay> selectHealthyEssays(){
        LambdaQueryWrapper<HealthyEssay> queryWrapper= new LambdaQueryWrapper<>();
        return this.selectList(queryWrapper);
    };

}